<?php

use yii\db\Migration;

/**
 * Handles adding columns to table `{{%contractor}}`.
 */
class m221110_085035_add_financial_columns_to_contractor_table extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%contractor}}', 'checking_account', $this->string());
        $this->addColumn('{{%contractor}}', 'correspondent_account', $this->string());
        $this->addColumn('{{%contractor}}', 'bank_name', $this->string());
        $this->addColumn('{{%contractor}}', 'bank_bik', $this->string());
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%contractor}}', 'checking_account');
        $this->dropColumn('{{%contractor}}', 'correspondent_account');
        $this->dropColumn('{{%contractor}}', 'bank_name');
        $this->dropColumn('{{%contractor}}', 'bank_bik');
    }
}
